#pragma once



class CMainConfig :
	public CStaticObject<CMainConfig>
{
protected:
	CIPAddress					m_ServerAddress;
	CEasyString					m_CSVPath;
	CEasyArray<CEasyString>		m_MPQFiles;
	UINT						m_ScreenWidth;
	UINT						m_ScreenHeight;

public:
	CMainConfig(void);
	~CMainConfig(void);

	bool LoadConfig(LPCTSTR FileName);

	const CIPAddress& GetServerAddress()
	{
		return m_ServerAddress;
	}
	LPCTSTR GetCSVPath()
	{
		return m_CSVPath;
	}
	UINT GetMPQFileCount()
	{
		return m_MPQFiles.GetCount();
	}
	LPCTSTR GetMPQFileName(UINT Index)
	{
		if(Index<m_MPQFiles.GetCount())
			return m_MPQFiles[Index];
		return NULL;
	}
	UINT GetScreenWidth()
	{
		return m_ScreenWidth;
	}
	UINT GetScreenHeight()
	{
		return m_ScreenHeight;
	}
	FLOAT GetScreenRate()
	{
		return (FLOAT)m_ScreenWidth/m_ScreenHeight;
	}
};
